<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/29 0029
 * Time: 21:17
 */

/**
 * 获取当前时间戳(毫秒级)
 * @return float
 */
function getMsTimestamp(){
    list($t1, $t2) = explode(' ', microtime());
    return (float)sprintf('%.0f',(floatval($t1)+floatval($t2))*1000);
}

/**
 * 得到文件的扩展名
 * @param string $filename
 * @return string
 */
function getExt($filename){
    return strtolower(end(explode(".",$filename)));
}